<?php

namespace App\Models\Member;

use App\Models\BaseModel;

class GoodType extends BaseModel
{
    protected $fillable = [
        'id', 'store_id', 'title', 'mark',
        'sort', 'status', 'created_at', 'updated_at'
    ];

    public function getType($storeId)
    {
        $data = $this->where('store_id', $storeId)
                     ->where('status', 1)
                     ->orderBy('sort', 'desc')
                     ->select(['id', 'title'])
                     ->get()
                     ->toArray();

        return $data;
    }

}
